<%
  #File:    /app/views/manage/messages/show.rhtml
  #Author:  Andrew Stone
  #Created: 09.19.2006
%> 

<%=error_messages_for("message")%>

<%=start_large_div_wrapper%>

  <div id="page_title">Showing message <%=@message.title%></div>
  <div id="large">
    <table>
      <tbody>
        <tr>
          <td class="req_label">* Title:</td>
          <td class="data"><%=h(@message.title)%></td>
        </tr>
        <tr>
          <td class="req_list_label">* Details:</td>
          <td class="list_data"><%=@message.details%></td>
        </tr>
        <tr>
          <td class="req_label">* Expires On:</td>
          <td class="date_select"><%=mmddyyyy(@message.expires_on)%></td>
        </tr>
        <% if @message.page %>
          <tr>
            <td class="list_label">Referenced Page:</td>
            <td class="data">
              <%=h(@message.page.qualified_name)%>
            </td>
          </tr>
        <% end %>
        <% 
          if @message.user_group.length > 0 %>
            <tr>
              <td class="list_label">Restricted to User Groups:</td>
              <td class="list_data">
              <%
                @message.user_group.each do |mug|
              %>
                  <%=mug.name%><br/>
              <%
                end
              %>
              </td>
            </tr>
        <% end %>
      </tbody>
    </table>
    <div id="actions">
      <%=secure_links([
            secure_link_to("List",ca("/manage/messages","list")),
            secure_link_to("Update",ca("/manage/messages","update",@message.id)) ])%>
    </div>
  </div>
<%=end_div_wrapper%>
